package com.wg.net.protocols;

import com.wg.net.operations.base.OperationRequest;
import com.wg.net.operations.InitRequest;

public class Protocol {
    public static InitRequest parseInitRequest(byte[] data) {
        IProtocol rpcProtocol = BinaryByteProtocol.getInstance();
        OperationRequest request = rpcProtocol.parseOperationRequest(data, false);
        if (request == null) {
            return null;
        }

        return new InitRequest(rpcProtocol, request);
    }
}
